const { ethers, getNamedAccounts } = require("hardhat")

async function main() {
  const { deployer } = await getNamedAccounts();
  const BehaviorCheck = await ethers.getContract("BehaviorCheck", deployer)

  console.log(`Got contract BehaviorCheck at ${BehaviorCheck.address}`)
  console.log("addHospital from contract...")

  const transactionResponse = await BehaviorCheck.addHospital(
    "0x4B20993Bc481177ec7E8f571ceCaE8A9e22C02db"
  );
  await transactionResponse.wait()
  console.log("added hospital!")
}

main()
  .then(() => process.exit(0))
  .catch((error) => {
    console.error(error)
    process.exit(1)
  })